/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication1.uno;

/**
 *
 * @author abelitro
 */
interface A {

    void x();
}

class B implements A {

    public void x() {
    }

    public void y() {
    }
}

class C extends B {

    public void x() {
    }
}

public class TestC {

    public static void main(String[] args) {
        java.util.List<A> list = new java.util.ArrayList<A>();

        list.add(new B());
        list.add(new C());
        for (A a : list) {
            a.x();
        }
    }
}